package Year22_Month03.day02;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int res = fun(a, b);
            System.out.println(res);
        }
        sc.close();
    }

    public static int fun(int a,int b){
        if((a == 1 && b >= 1) || (b == 1 && a >= 1)){
            return a + b;
        }
        return fun(a - 1,b) + fun(a,b - 1);
    }
}
